clear all;
close all;
clc;

v = [0.607252935 0]';
beta = 0;
K = 1;

betaT = pi/6;

for i = 0 : 39
	if (beta <= betaT)
		sigma = 1;
	else
		sigma = -1;
	endif
	v = [1 -1.*sigma.*2.^(-1.*i); sigma.*2.^(-1.*i) 1]*v;
	beta = beta + sigma.*atan(2.^(-1.*i));
	K = K./sqrt(1+2.^(-2.*i));
endfor

v
%v_normalized = v .* K
K